<?php
namespace app\admin\controller;
use \think\Controller;
use \think\Session;
use \think\Db;
class Match extends Common
{
	public function index(){
		if(input('method')=='0'||input('method')==''){
			$result = Db::name("contests")->order('co_id')->paginate(10);
		}else{
			$result = Db::name("contests")->order('co_id')->where(input('method'),'like',"%".input('search')."%")->paginate(10);
		}
		$this->assign('contests',$result);
		return $this->fetch("match/index");
	}

	
}